<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="frm.ssh.util.page.SearchBean"%>
<%@ include file="/jsp/common/common.jsp"%>

<html>
	<head>
		<script language="javascript" src="<%=contextPath%>/js/func.js"type=""></script>
		<script type="text/javascript" src="<%=contextPath%>/js/My97DatePicker/WdatePicker.js"></script>
		<script language="javascript" src="<%=contextPath%>/js/sorttable.js"type=""></script>
		<link rel="stylesheet" type="text/css"	href="<%=contextPath%>/css/sorttable.css">
		<script>
			Ext.onReady(function(){
				var tb = new Ext.Toolbar({
			   		renderTo: document.all.tbar,
			    	items: [
				        {
				            text: '查询',
				            icon:"<%=contextPath%>/images/query.gif",
				            handler:cmt
				        },'-',
				        {
				            text: '清空',
				            icon:"<%=contextPath%>/images/clear.png",
				            handler:resetForm
				        },'->',
				        {
				            text: '查询条件',
				            icon:"<%=contextPath%>/images/down_bottom.gif",
				            handler:displayquerydiv
				        }
			    	]
			    });
			});
		</script>
	</head>
	<body>
		<div id ='tbar'></div>
		<br>
		<div id="Layer" style="position:absolute;display:block left:0px; top:35px; width:100%; height:94%; z-index:1000; overflow:auto;">
		
		<form id="frmM" name="frmM" method="POST" action="<%=contextPath%>/queryUser.do">
			<s:hidden name="searchBean.displayFlag" />		
			<s:hidden name="searchBean.con1" />
			<s:hidden name="searchBean.con5" />
			<s:hidden name="searchBean.con6" />
			<s:hidden name="searchBean.con10" />
			<table width="100%" id="contab">
				<tbody id="querydiv">
				<tr>
					<!--<th style="width:40">
						日期：
					</th>
					<td width="230">
						<input type="text"  readonly="true" name="searchBean.con2" size="8"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:$dp.$('searchBean.con2')})" id="searchBean.con2" value="${searchBean.con2}"/>
						<img onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:$dp.$('searchBean.con2')})" src="<%=contextPath%>/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">
						&nbsp;
						~
						&nbsp;
						<input type="text"  readonly="true" name="searchBean.con3" size="8" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:$dp.$('searchBean.con3')})" id="searchBean.con3" value="${searchBean.con3}"/>
						<img onclick="WdatePicker({dateFmt:'yyyy-MM-dd',el:$dp.$('searchBean.con3')})" src="<%=contextPath%>/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">
					</td>
					<th style="width:60">
						变电站：
					</th>
					<td>
						<input type="text" readonly="true" name="searchBean.con4" size="15" id="searchBean.con4" value="${searchBean.con4}"/>
						<img style='cursor:pointer' src="<%=contextPath%>/images/editlink.gif" title="选择变电站" 
						onClick="javascript:getBdz('searchBean.con5','searchBean.con4','searchBean.con6')" />
					</td>
					<th style="width:60">
						人员：
					</th>
					<td >
					    <input type="text"   readonly="true" style="width:60" name="searchBean.con9" value="${searchBean.con9}" >
						<img style='cursor:pointer' src="<%=contextPath%>/images/editlink.gif" title="" onClick="javascript:getUserselect('searchBean.con10','searchBean.con9')" />
					</td>
					<th style="width:60">
						设备类型：
					</th>
					<td >
						<s:select list="sblxList" emptyOption="true" onchange="javascript:cmt()" name="searchBean.con8"  style="width:100" listKey="itemId" listValue="itemName"/>
					</td>
					<th style="width:60">
						设备名称：
					</th>
					<td style="width:150">
					
					<input type="text"  style="width:80%" readonly="true"  name="searchBean.con7" value="${searchBean.con7}"  />
					<img style='cursor:pointer' src="<%=contextPath%>/images/editlink.gif" title="" onClick="javascript:getSB('${searchBean.con5}')" />
					</td>-->
			        <th style="width:100">电压等级&nbsp;</th>
					<td>
						<s:select list="#{7:'10kV',6:'35kV',3:'110kV',2:'220kV'}" emptyOption="true" onchange="javascript:cmt()" name="searchBean.con18" style="width:100" />
					</td>
					<th style="width:60">
						厂站名称&nbsp;
					</th>
					<td >
						<s:select list="sblxList" emptyOption="true" onchange="javascript:cmt()" name="searchBean.con8"  style="width:100" listKey="id" listValue="departmentname"/>
					</td>
					<th style="width:100">
						剩余跳闸次数&nbsp;
					</th>
					<td style="width:50">
					<input type="text"  style="width:80%"   name="searchBean.con7" value="${searchBean.con7}"  />
					</td>
					<td style="width:550">
					&nbsp;
					</td>
				</tr>
				</tbody>
			</table>
</div>
<center>

<div id="Layer" style="position:absolute;display:block left:0px; top:50px; width:100%; height:500px; z-index:1; overflow: auto;">
<!-- start -->

<table id="listtab" cellspacing="1" cellpadding="1" width="100%">

                 <tr >
                 <br>
					<td class="DataTable_Title" valign="middle" align="center"width="10%" colsan="6">断路器故障跳闸次数统计</td>
                </tr>
</table>            
<table id="listtab" cellspacing="1" cellpadding="1" width="100%">
    <tr class="sheet2">
        <td width="100%">
            <table border="0" cellspacing="1" width="100%" class="sheet" >
            <c:if test="${searchBean.con18 == '7'||searchBean.con18 =='6'||searchBean.con18 =='3'}">
					<tr class="sheet2">
                    <td valign="middle" class="DataTable_Title" width="10%" nowrap rowspan="1">厂站名称</td>
					<td valign="middle" class="DataTable_Title" width="20%" nowrap rowspan="1">开关名称</td>
					<td valign="middle" class="DataTable_Title" width="10%" nowrap colspan="1">允许跳闸次数</td>
					<td valign="middle" class="DataTable_Title" width="10%" nowrap colspan="1">累计跳闸次数</td>
					<td valign="middle" class="DataTable_Title" width="10%" nowrap colspan="1">剩余跳闸次数</td>
					<td valign="middle" class="DataTable_Title" width="10%" nowrap colspan="1">总累计跳闸次数</td>
					<!--  <td valign="middle" class="std_title" width="34%" nowrap rowspan="2">保护及重合闸动作情况</td>
					<td valign="middle" class="std_title" width="10%" nowrap rowspan="2">值班调度员</td>
					<td valign="middle" class="std_title" width="10%" nowrap rowspan="2">检修日期</td>-->
                </tr>
                   
	            <c:forEach items="${list}" var="detail" >
		           <tr>
		            <td valign="middle" align="center" width="10%" nowrap><c:out value="${detail.departmentname}"/></td>
					<td valign="middle" align="left" width="10%" nowrap><c:out value="${detail.devicename}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.allowablecounta}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.accumulatedcounta}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.allowablecounta-detail.accumulatedcounta}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.accumulatedtotalcounta}"/></td>
				 </tr>
						</c:forEach>
		        	</c:if>
	        	<c:if test="${searchBean.con18 == '2'||searchBean.con18 == null}">
 
                <tr class="sheet2">
                    <td valign="middle" class="DataTable_Title" width="10%" nowrap rowspan="2">厂站名称</td>
					<td valign="middle" class="DataTable_Title" width="10%" nowrap rowspan="2">开关名称</td>
					<td valign="middle" class="DataTable_Title" width="21%" nowrap colspan="3">允许跳闸次数</td>
					<td valign="middle" class="DataTable_Title" width="21%" nowrap colspan="3">累计跳闸次数</td>
					<td valign="middle" class="DataTable_Title" width="21%" nowrap colspan="3">剩余跳闸次数</td>
					<td valign="middle" class="DataTable_Title" width="21%" nowrap colspan="3">总累计跳闸次数</td>
					<!--  <td valign="middle" class="std_title" width="34%" nowrap rowspan="2">保护及重合闸动作情况</td>
					<td valign="middle" class="std_title" width="10%" nowrap rowspan="2">值班调度员</td>
					<td valign="middle" class="std_title" width="10%" nowrap rowspan="2">检修日期</td>-->
                </tr>
                
                <tr class="sheet2">

					<td valign="middle" class="DataTable_Title" width="7%" nowrap >A</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >B</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >C</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >A</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >B</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >C</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >A</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >B</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >C</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >A</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >B</td>
					<td valign="middle" class="DataTable_Title" width="7%" nowrap >C</td>
                </tr>

	           <c:forEach items="${list}" var="detail" >
		            
		         <tr >
		            <td valign="middle" align="center" width="10%" nowrap><c:out value="${detail.departmentname}"/></td>
					<td valign="middle" align="left" width="10%" nowrap><c:out value="${detail.devicename}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.allowablecounta}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.allowablecountb}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.allowablecountc}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.accumulatedcounta}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.accumulatedcountb}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.accumulatedcountc}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.allowablecounta-detail.accumulatedcounta}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.allowablecountb-detail.accumulatedcountb}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.allowablecountc-detail.accumulatedcountc}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.accumulatedtotalcounta}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.accumulatedtotalcountb}"/></td>
					<td valign="middle"  width="7%" nowrap ><c:out value="${detail.accumulatedtotalcountc}"/></td>
		         </tr>
		       </c:forEach>
	   </c:if>		
          </table>
<!-- end -->
        </td>
    </tr>
   </table>
   <table width="100%" id="tablestyle2">
				<tr>
					<td>
						<hr />
					</td>
				</tr>
				<tr>
					<td>${pageDown}</td>
				</tr>
			</table>
</div>
</form>
</center>
</body>
</html>
<SCRIPT Language="JavaScript">
// 查询
			function cmt(obj){
				document.frmM.action = "<%=contextPath%>/dlqtzStaticsList!getList.do?page=1&c=c&searchBean.con15=";
				document.frmM.submit();
			}
function searchButton() {
    if (document.forms[0].elements["submitFlg"].value==0) {
        document.forms[0].elements["submitFlg"].value=1;
        document.forms[0].action="business/dlqtzStaticsListAction.do?dispatch=search&a=1"
        document.forms[0].submit();
    }
    return false;
}

function resetButton() {
    if (document.forms[0].elements["submitFlg"].value==0) {
        document.forms[0].elements["submitFlg"].value=1;
        document.forms[0].action="business/dlqtzStaticsListAction.do?dispatch=init&page=0"
        document.forms[0].submit();
    }
    return false;
} 

function previousPage() {
	if (document.forms[0].elements["submitFlg"].value == 0) {
		document.forms[0].elements["submitFlg"].value=1
		document.forms[0].action="business/dlqtzStaticsListAction.do?dispatch=movePrevious";
		document.forms[0].submit();
	}
	return false;
}

function nextPage() {
	if (document.forms[0].elements["submitFlg"].value == 0) {
		document.forms[0].elements["submitFlg"].value=1
		document.forms[0].action="business/dlqtzStaticsListAction.do?dispatch=moveNext";
		document.forms[0].submit();
	}
	return false;
}


function changeSelect(flag) {
	document.forms[0].action="business/dlqtzStaticsListAction.do?dispatch=reload";
	document.forms[0].submit();	
}
</SCRIPT>